<?php

class IdeasController extends AppController {
    
    public $components = array('Session','CreativoImage.CreativoImage');
    
    public function beforeFilter() {
        parent::beforeFilter();
        $this->Auth->allow('index','upload');
    }
    
    public function index() {
        
    }
    
    public function upload() {
        if ($this->request->data) {
            $im = $this->CreativoImage->createImage($this->request->data['Idea']['image']['tmp_name']);
            $im->output();
        }
    }
}
?>